package com.sixth.util;


public class CouponUtil {


    public static String getRandomCode(){

        char[] codes = new char[]{'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q',
                'R','S','T','U','V','W','X','Y','Z','0','9','8','7','6','5','4','3','2','1'};

        String code = "";
        for (int i = 0; i < 8; i++) {
            int index = (int) ((Math.random()*35)+1);
            code = code + codes[index];
        }

        return code;
    }

}
